#pragma once
#include <QtGui/QWidget>
#include "ui_ZTongjiWidget.h"
#include "../../ZWuliuSvr/DBOpt/ZDBWuliuPackage.h"
#include "../ZWuliuSvr/DBOpt/ZDBWuliuCaiwu.h"
#include "../ZWuliuSvr/DBOpt/ZDBWuliuPaiche.h"

class ZTongjiWidget : public QDialog
{
	Q_OBJECT
private:
	enum
	{
		SelCol = 1
	};
public:
	ZTongjiWidget(bool bLocalMode, QWidget *parent = 0, Qt::WFlags flags = 0);
	virtual ~ZTongjiWidget(void);

private slots:
	void _onTongji_huo(bool bChecked);
	void _onTongji_che(bool bChecked);
	void _onPrintCaiwu(bool bChecked);
	void _reloadCaiwuTable(bool bChecked);
	void _reloadCaiwuDetailTable(QString sCaiwuDanType);
	void _onOpenDetailTableLinkLabel(QString sLink);
	void _onOpenCaiwuTableLinkLabel(QString sLink);

private:
	void _getCaiwuData(bool bPaiche);

private:
	Ui::ZTongjiWidgetClass			ui;
	std::vector<ZDBWuliuCaiwu>		m_vecCaiwu;
	std::vector<ZDBWuliuPackage>	m_vecPackages;
	std::vector<ZDBWuliuPaiche>		m_vecPaiche;
	bool							m_bLocalMode; 
	int								m_iCurCaiwuIndex;

	bool							m_lastModeIsPaiche;
};

